cmake_minimum_required(VERSION 3.22)
project(link_directories_test)

link_directories(lib)
link_directories(BEFORE lib2)

add_executable(main main.cpp)
target_link_libraries(main test test2)